package main

import (
	"fyne.io/fyne/v2/app"
	"fyne.io/fyne/v2/canvas"
	"fyne.io/fyne/v2/theme"
	"fyne.io/fyne/v2/widget"
)

func main() {
	//	创建一个APP
	a := app.New()
	// 给APP创建个一个窗口，NewWindow 函数需要传入一个窗口的命名
	w := a.NewWindow("Achou.Wang")
	// 创建一个按钮，按钮点击之后会退出程
	//w.SetContent(widget.NewCard("Card Title", "Subtitle",
	//	widget.NewLabel("Content")))
	//w.SetContent(&widget.Card(Title:"Card Title", Subtitle:"Subtitle", Image:canvas.NewImageFromResource(theme.FyneIcon())))
	w.SetContent(widget.NewCard("Card Title", "Subtitle", canvas.NewImageFromResource(theme.FyneLogo())))



	// 将窗口显示处理
	w.ShowAndRun()
}
